package com.example.demo.converter;

import com.example.demo.DTO.userDTO;
import com.example.demo.dao.user;

public class userConverter {
    public static userDTO convertTest(user user) {
        userDTO userDTO = new userDTO();
        userDTO.setId(user.getId());
        userDTO.setName(user.getName());
        userDTO.setPhone(user.getPhone());
        userDTO.setEmail(user.getEmail());
        userDTO.setPass(user.getPass());
        userDTO.setCity(user.getCity());
        userDTO.setGender(user.getGender());
        userDTO.setBank(user.getBank());
        userDTO.setMoney(user.getMoney());
        return userDTO;
    }
    public static user convertTest(userDTO userDTO) {
        user user = new user();
        user.setName(userDTO.getName());
        user.setPhone(userDTO.getPhone());
        user.setEmail(userDTO.getEmail());
        user.setPass(userDTO.getPass());
        user.setCity(userDTO.getCity());
        user.setGender(userDTO.getGender());
        user.setBank(userDTO.getBank());
        user.setMoney(userDTO.getMoney());
        return user;
    }
}
